<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href=<%=basePath %>>
<title></title>
<link href="houtai/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" >
function ckContent(){
	var neirong=document.getElementById("neirong").value;
	var regC=/^\s{0,}$/;//\s空白字符
		if(regC.test(neirong)||neirong==null||neirong.length==0){
			alert("内容不能为空,请填写完整!");
			return false;
	
		}
		return true;

}
function ckphone(){
	var phone=document.getElementById("phone").value;
	var regT=/^\s{0,}$/;//\s空白字符
		if(regT.test(phone)||phone==null||phone.length==0){
			alert("电话不能为空,请填写!");
			return false;
		}
		
	var tel= /^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|17[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/;
	if(!tel.test(phone)){
		alert("对不起！请输入正确的手机号！");
		return false;
	}
	 
	return true;
}


function sub(){
if(confirm("确认提交?")){
document.name.submit();
}
else return false;
alert("提交成功!");
}

function ckall(){

 
	return ckContent()&&ckphone()&&sub();

}






</script>

</head>
<body>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="3">
  <tr>
    <td style="height:25px; background-color:#f3f3f3; font-weight:bold" valign="top">
    &nbsp;&nbsp;&nbsp;&nbsp;当前位置：
    <img src="houtai/images/arrow.gif" align="absmiddle">&nbsp;&nbsp;soda创业教育平台&nbsp;&nbsp;
    <img src="houtai/images/arrow.gif" align="absmiddle">&nbsp;&nbsp;后台管理&nbsp;&nbsp;
    <img src="houtai/images/arrow.gif" align="absmiddle">&nbsp;&nbsp;单页管理</td>
  </tr>
  <tr>
    <td style="height:34px; background-image:url(houtai/images/main_header.gif); border-bottom:1px solid #cfd8e0; padding:0px">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="20" height="34"><img src="houtai/images/main_headerL.gif" width="20" height="34"></td>
          <td style="color:#90c8e8;"><img src="houtai/images/icon_card.gif" width="16" height="16" align="absmiddle">&nbsp;&nbsp;
          <strong>联系我们</strong></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td height="100%" valign="top">
    <div style="overflow:auto;height:100%; width:100%">
    <form action="ContactServlet?param=update" method="post" name="name" onsubmit="return ckall()">
      <table width="100%" border="0" cellpadding="3" cellspacing="1" class="table1">
        <tr>
        	<td style="text-align:right">标题</td>
            <td  ><span>${contact.conTitle}</span></td>
        </tr>
        <tr>
        	<td style="text-align:right">操作人</td>
            <td><input type="text"	readonly="readonly" value="${sessionScope.user.useLoginName }"/></td>
        </tr>
        <tr>
        	<td style="text-align:right">联系电话</td>
            <td><input type="text" name="phone" id="phone" value="${contact.conPhone}" onblur=" ckphone()"/></td>
        </tr>
        <tr>
        	<td style="text-align:right">内容</td>
            <td><textarea rows="15" cols="52"id="neirong" name="neirong" onblur="ckContent()">${contact.conContent}</textarea></td>
        </tr>
        <tr>
        	<td style="text-align:right"></td>
            <td><input type="submit" value="提交"></td>
        </tr>
      </table>
      </form>
    </div>
  </td>
  </tr>
</table>
</body>
</html>